import Layout from '@/views/layout/Layout'

const ROLES = ['admin', 'user']

const setting = {
  path: '/setting',
  component: Layout,
  name: 'setting',
  meta: {
    title: '系统设置',
    icon: 'international',
    roles: ROLES
  },
  children: [
    {
      path: 'account-list',
      component: () => import('@/views/setting/accountList'),
      name: 'setting-account-list',
      meta: { title: '账号管理', icon: 'documentation', roles: ['admin'] }
    },
    {
      path: 'account-info',
      component: () => import('@/views/setting/accountInfo'),
      name: 'setting-account-info',
      meta: { title: '账号信息', icon: 'documentation', roles: ROLES }
    },
    {
      path: 'role-list',
      component: () => import('@/views/setting/roleList'),
      name: 'setting-role-list',
      meta: { title: '角色列表', icon: 'documentation', roles: ['admin'] }
    }
  ]
}

export default setting
